package com.zzc.controller;

import com.zzc.common.JsonResult;
import com.zzc.common.TableResult;
import com.zzc.pojo.Customer;
import com.zzc.pojo.UserToken;
import com.zzc.service.RoleService;
import com.zzc.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhouzhicheng
 * @version 1.0  2020/12/30
 */
@RequestMapping("/sys/token")
@RestController
public class TokenController {
    @Autowired
    private TokenService tokenService;
    @RequestMapping("/table")
    public TableResult getTokenList( String accessToken,Integer page, Integer limit){
        return tokenService.getTokenList(accessToken,page,limit);
    }
    @RequestMapping("/del")
    public JsonResult deleteTokenById(Integer[] ids){
        return tokenService.deleteTokenById(ids);
    }
    @RequestMapping("/update")
    public JsonResult updateToken(UserToken token){
        return tokenService.updateByPrimaryKeySelective(token);
    }
}
